<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_507682_ornhj3o0vs8257b9.css"/>
		<style type="text/css">
			/*.maxRemind .maxRemind_music_open {
				position:absolute;
				top:7px;
				right:32px;
				width:21px;
				height:16px;
				background: url();
			}
			.maxRemind .maxRemind_music_close {
				position:absolute;
				top:7px;
				right:32px;
				width:18px;
				height:16px;
				background: url();
			}*/
			
			
			/*.maxRemind {
				position: fixed;
			    right: 10px;
			    bottom: 10px;
			    background: #fff;
			    color:#333;
			    border-radius: 3px;
			    min-width: 240px;
			    min-height:120px;
			    cursor: pointer;
			    border: 1px solid #0099CC;
			}
			.maxRemind-title {
				position: relative;
				top:0;
				left: 0;
				right:0;
				height: 30px;
				line-height: 30px;
				color: #fff;
				background-color: #09c;
				border-top-left-radius: 3px;
				border-top-right-radius: 3px;
				border-bottom: 1px solid #09c;
				padding-left: 6px;
			}
			.maxRemind-close {
				position: absolute;
				top:7px;
				right: 3px;
				width: 16px;
				height: 16px;
				background: url();
			}
			.maxRemind-msg {
				padding: 6px;
				word-break: break-all;
			}*/
		</style>
	</head>
	<body>
		<!--<div class="maxRemind">
			<div class="maxRemind-close"></div>
			<div class="maxRemind-msg">123132123132123132123132123132123132123132123132123132123132123132123132123132123132</div>
		</div>-->
		<script src="../jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="maxRemind.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var count = 1;
			orderRemind({
				url:'',
				time:10000,
				msg:'这是第'+ count +'次',
				order_remind: true,
				path: '',
				callback: function(obj){
					console.log($(obj).html())
					console.log('data');
					// return false
				}
			})
			/* 
			  	orderRemind({
					url:'',  					//请求地址
					method: '',					//请求方式
					time:15000,					//请求时间间隔，默认15秒
					title:'订单提醒'
					msg: '',					// 提示内容,默认为空，显示ajax返回的msg信息
					isTop: false,				// 是否在顶层窗口显示，默认false,
					callback: function(){		// 点击提示消息的回调函数
						console.log('data');
					}
				})
			 * */
			function orderRemind(options){
				if(!options){
					return;
				}
				var fn = function(){
					
					/*$.ajax({
						url: options.url,
						type: options.method == 'undefined' ? options.method : 'get',
						success: function(data){
							if(data.success == 0 ){
								new MaxRemind({
									isTop:options.isTop == 'undefined' ? options.isTop : false,					//提示框的显示的位置，false:在当前调用插件的窗口显示；true:在当前调用插件的顶层窗口显示。
									msg: options.msg == 'undefined' ? options.msg : data.msg,
									callback: function(){
										options.callback && options.callback(data);
									}
								});
							}
						}
					});*/
					new MaxRemind({
						path: options.path,
						order_remind: true,
						msg:'您当前还有:<a onclick="alert(1);">1个待发货订单</a>,<a onclick="alert(2);">1个待退款订单</a>需要处理，请注意查看!',
						callback: options.callback
					});
					count++;
				};
				fn();
				setInterval(function(){
					// fn();
				}, options.time)
			}
			
			
			/*new MaxRemind({
				callback: function(){
					console.log(123);
				}
			});
			setInterval(function(){
				new MaxRemind({
					callback: function(){
						console.log(123);
					}
				});
			}, 10000)*/
		</script>
	</body>
</html>
